package com.jmyd.sharding.base.dto;

import com.jmyd.sharding.constants.Constant;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 手机号与验证码Dto类
 *
 * @author samphin
 * @date 2020-11-30 19:07:29
 */
@Data
public class TelephoneDto {

    /**
     * 手机号码
     */
    @NotBlank(message = "请填写手机号.")
    @Length(min = 11, max = 11, message = "手机号必须11位.")
    @Pattern(regexp = Constant.VALIDATE_TELEPHONE_REGEXP, message = "请输入正确手机号.")
    private String telephone;

}
